/**
 * @Title: SexEnum
 * @Package cn.com.yiqi.wsc.enumeration
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-胥钰淋
 * @date 2017/2/14 13:41
 * @version V1.0
 */
package cn.com.yiqi.wsc.enumeration;

/**
 *
 *@ClassName: SexEnum
 * @Description: TODO
 * @author 会员系统组-胥钰淋
 * @date 2017/2/14 13:41
 *
 */
public enum SexEnum {

    men(1),
    women(2);

    private int value;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    private SexEnum(int value) {
        this.value = value;
    }

    public static SexEnum getSexEnum(int sex) {
        for (SexEnum e:
             SexEnum.values()) {
            if (e.getValue() == sex) {
                return e;
            }
        }
        return null;
    }
}
